# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=bolt
pkgver=0.9
pkgrel=0
pkgdesc="Thunderbolt 3 device manager"
url="https://gitlab.freedesktop.org/bolt/bolt"
arch="all"
license="LGPL-2.1-or-later"
makedepends="meson eudev-dev glib-dev polkit-dev asciidoc"
checkdepends="dbus py3-gobject3 bash"
subpackages="$pkgname-doc"
source="https://gitlab.freedesktop.org/bolt/bolt/-/archive/$pkgver/bolt-$pkgver.tar.gz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		-Dman=true \
		-Dsystemd=false \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="427e9ad95a8d018dd22326cc4b458fc9149b001d3aa6e4bb8e4047eaf6c3cf04a4dc3be9396049734dc0bd54f990b3bce31b6eef4031e3b671a6202a588cfe78  bolt-0.9.tar.gz"
